package com.cfpl.admin_vegetable_service.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cfpl.admin_vegetable_service.DTO.VegNameAndPlantLocationDTO;
import com.cfpl.admin_vegetable_service.VO.QualityInspectionPageVO;
import com.cfpl.project_common.pojo.QualityInspectionRecord;
import com.baomidou.mybatisplus.extension.service.IService;

/**
* @author 14720
* @description 针对表【quality_inspection_record(质量检查记录表)】的数据库操作Service
* @createDate 2023-11-02 10:16:29
*/
public interface QualityInspectionRecordService extends IService<QualityInspectionRecord> {
    /**
     * 分页查询质量检测记录
     * @param page  分页信息
     * @param condition  查询条件
     * @return  质量检测记录
     */
    Page<QualityInspectionPageVO> queryPage(IPage<QualityInspectionPageVO> page, String condition);

    /**
     * 添加质量检测记录
     * @param qualityIInspectionRecord 质量检测记录对象
     * @return
     */
    void addQualityInspectionRecord(QualityInspectionRecord qualityIInspectionRecord);

    /**
     * 根据样品编号（进场批次）查询果蔬名称和种植地
     * @param sampleNumber 样品编号
     * @return
     */
    VegNameAndPlantLocationDTO queryBySampleNumber(String sampleNumber);
    /**
     * 根据质量检测id查询单条记录
     * @param id  质量检测id
     * @return 质量检测单条记录
     */
    QualityInspectionRecord queryQualityInspectionRecordById(Long id);
}
